import { ElMessage } from "element-plus";
/**
 * 消息提示
 */
const message = {
  success(message) {
    ElMessage.success({
      showClose: true,
      grouping: true,
      message: message || "操作成功",
      duration: 5000,
      type: "success",
    });
  },

  error(message) {
    ElMessage.error({
      showClose: true,
      grouping: true,
      message: message,
      duration: 5000,
      type: "error",
    });
  },

  warning(message) {
    ElMessage.warning({
      showClose: true,
      grouping: true,
      message: message,
      duration: 5000,
      type: "warning",
    });
  },

  info(message) {
    ElMessage.info({
      showClose: true,
      grouping: true,
      message: message,
      duration: 5000,
      type: "info",
    });
  },
};

export default message;
